<extend name="Public/base"/>

<block name="body">
<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <div class="main-title cf">
        <h2>
            <!-- <if condition="ACTION_NAME eq 'add'">新增合同
                <else/>
               编辑合同
            </if> -->
           私人定制
        </h2>
    </div>
    <!-- 表单 -->
    <div class="with-padding">
	
	<div>		
	<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<!-- #section:basics/sidebar -->
			

			<!-- /section:basics/sidebar -->
			<div class="main-content">
				<!-- #section:basics/content.breadcrumbs -->
				

				<!-- /section:basics/content.breadcrumbs -->
				<div class="page-content">
					<!-- #section:settings.box -->
				

					<!-- /section:settings.box -->
					<div class="page-content-area">
					

						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS -->
								

								<div class="widget-box">
									<div   class="widget-header widget-header-blue widget-header-flat">
										<h4 class="widget-title lighter" >
										    <present name="data">{$da.xname}</present>
										</h4>
										<!-- //{:dump($da)} -->
									</div>

									<div class="widget-body">
										<div class="widget-main">
											<!-- #section:plugins/fuelux.wizard -->
											<div id="fuelux-wizard" data-target="#step-container">
												<!-- #section:plugins/fuelux.wizard.steps -->
												<ul class="wizard-steps">
													<li data-target="#step1" class="active">
														<span class="step">1</span>
														<span class="title">技术匹配</span>
													</li>

													<li data-target="#step2">
														<span class="step">2</span>
														<span class="title">专家分配</span>
													</li>

													<li data-target="#step3">
														<span class="step">3</span>
														<span class="title">完成</span>
													</li>

												<!--	<li data-target="#step4">
														<span class="step">4</span>
														<span class="title">Other Info</span>
													</li>
												</ul>-->

												<!-- /section:plugins/fuelux.wizard.steps -->
											</div>

											<hr />

											<!-- #section:plugins/fuelux.wizard.container -->
											<div class="step-content pos-rel" id="step-container">
												<div class="step-pane active" id="step1">
													<h3 class="lighter block green">智能匹配技术列表</h3>
	                                                        
														<div class="page-content-area" style="width:1000px; margin:auto">
		
						                                       <table class="table table-hover">
																  <thead>
																    <tr>
																      <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
																      <th>ID</th>
																      <th>技术名称</th>
																      <th>所在领域</th>
																      <th>技术标签</th>
																      <th>操作</th>
																    </tr>
																  </thead>
																  <tbody>
																  				                                      
						                                            <notempty name="_list">
						                                              <volist name="_list" id="vo">
																	    <tr>
																	      <td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}"/></td>
																	      <td>{$vo.id}</td>
																	      <td>{$vo.tecname}</td>
																	      <td>
																	          <volist name="vo.tids3" id="v">{$v.name}</volist>
																		      <span>--</span>
																		      <volist name="vo.tids4" id="v">{$v.name}　</volist>
																	      </td>
																	      <td>
																	        <volist name="vo.tids" id="v">{$v.lable}　</volist>
																	      </td>
																	      <td>
																	         <a href="{:U('Actmanage/jsdetail?id='.$vo['id'])}" class="authorize">详情</a>  
																	      </td>
																	    </tr>
																	  </volist>
																    </notempty>
																  </tbody>														  
																</table>
														    </notempty>
														</div>	

												</div>

												<div class="step-pane" id="step2">
													<div style="width:1100px; margin:auto">
                                                      <h3 class="lighter block green">分配专家</h3> 
													    <div class="page-content-area" style="width:1000px; margin:auto">						
                                                          
                                                            <table class="table table-hover">
																  <thead>
																    <tr>
																     <th><input class="ids" type="checkbox" name="id[]" value="{$vo.eid}"/></th>																      
																      <th>ID</th>
																      <th>专家名称</th>
																      <th>所在领域</th>
																      <th>技术标签</th>
																      <th>等级</th>
																      <th>操作</th>
																    </tr>
																  </thead>
																  <tbody>
																   <notempty name="data">
																   <volist name="data" id="vo">
																    <tr>
																    <td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}"/></td>
																      <td>{$vo.eid}</td>
																      <td>{$vo.expert}</td>
																      <td>
																         <volist name="vo.tidss1" id="v">{$v.name}</volist>
																		      <span>--</span>
																		  <volist name="vo.tidss2" id="v">{$v.name}　</volist>
																      </td>
																      <td> 
																         <volist name="vo.tidss" id="v">{$v.lable}　</volist>
																      </td>
																      <td>
																          <span class="label label-success">LV{$vo.level}</span>
																      </td>
																      <td>
																        <a>详情</a>
																      </td>
																    </tr>
																    </volist>
																  </notempty>  
																  </tbody>														  
																</table>
															

														
														</div>
													</div>
												</div>

												<div class="step-pane" id="step3">
													<div class="center">
														
													        <div class="page-content-area"  style="width:1000px; margin:auto">						
                                                                <!-- <h1 class="blue lighter">专家分配成功！</h1> -->  
                                                                <img src="/duijie/public/images/cheng.png">                                     								
														    </div> 
													</div>
												</div>

												
											</div>

											<!-- /section:plugins/fuelux.wizard.container -->
											<hr />
											<div class="wizard-actions">
												<!-- #section:plugins/fuelux.wizard.buttons -->
												<button class="btn btn-prev">
													<i class="ace-icon fa fa-arrow-left"></i>
													上一步
												</button>

												<button class="btn btn-success btn-next" data-last="完成">
													下一步
													<i class="ace-icon fa fa-arrow-right icon-on-right"></i>
												</button>

												<!-- /section:plugins/fuelux.wizard.buttons -->
											</div>

											<!-- /section:plugins/fuelux.wizard -->
										</div><!-- /.widget-main -->
									</div><!-- /.widget-body -->
								</div>

								
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content-area -->
				</div><!-- /.page-content -->
			</div><!-- /.main-content -->

			

			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
				<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->	
		</div>			
        <div class="form-item">
        <form id="form" action="{:U('changeStatus')}" method="post" class="form-horizontal">
            <input type="hidden" name="id" value="{$da.id}"/>
        </form>
    <!--  {:dump($da)} -->
            <!-- <button type="submit" class="btn submit-btn ajax-post" target-form="form-horizontal">{:L("_SURE_WITH_SPACE_")}</button>-->
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">{:L("_RETURN_WITH_SPACE_")}</button> 
        </div>      
       
    </div>
     
     
</block>

<block name="script">
    <script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <script type="text/javascript" charset="utf-8">
    Think.setValue('type', {$data.type|default = 1});
    Think.setValue('lstates', {$data.lstates|default = 1});
        //导航高亮
        highlight_subnav('{:U('Actmanage/vipindex')}');
    </script>
    
    <link type="text/css" rel="stylesheet" href="/duijie/Public/js/ext/magnific/magnific-popup.css"/>
    <script type="text/javascript" src="/duijie/Public/js/ext/magnific/jquery.magnific-popup.min.js"></script>

    <script type="text/javascript" charset="utf-8" src="/duijie/Public/js/ext/webuploader/js/webuploader.js"></script>
    <link href="/duijie/Public/js/ext/webuploader/css/webuploader.css" type="text/css" rel="stylesheet">


    <script>

        $(document).ready(function () {
            $('.popup-gallery').each(function () { // the containers for all your galleries
                $(this).magnificPopup({
                    delegate: 'a',
                    type: 'image',
                    tLoading: '正在载入 #%curr%...',
                    mainClass: 'mfp-img-mobile',
                    gallery: {
                        enabled: true,
                        navigateByImgClick: true,
                        preload: [0, 1] // Will preload 0 - before current, and 1 after the current image

                    },
                    image: {
                        tError: '<a href="%url%">图片 #%curr%</a> 无法被载入.',
                        titleSrc: function (item) {
                            /*           return item.el.attr('title') + '<small>by Marsel Van Oosten</small>';*/
                            return '';
                        },
                        verticalFit: true
                    }
                });
            });
                    });
    </script>
    
    <!-- 匹配技术 -->
    
    <!-- bootstrap & fontawesome -->
		
		<link rel="stylesheet" href="/duijie/public/assets/css/font-awesome.min.css" />

		<!-- page specific plugin styles -->
		<link rel="stylesheet" href="/duijie/public/assets/css/select2.css" />

		<!-- text fonts -->
		<link rel="stylesheet" href="/duijie/public/assets/css/ace-fonts.css" />

		<!-- ace styles -->
		<link rel="stylesheet" href="/duijie/public/assets/css/ace.min.css" id="main-ace-style" />

		<!--[if lte IE 9]>
			<link rel="stylesheet" href="assets/css/ace-part2.min.css" />
		<![endif]-->
		<link rel="stylesheet" href="/duijie/public/assets/css/ace-skins.min.css" />
		<link rel="stylesheet" href="/duijie/public/assets/css/ace-rtl.min.css" />
		
		<script src="/duijie/public/assets/js/ace-extra.min.js"></script>
    
    <script type="text/javascript">
			window.jQuery || document.write("<script src='/duijie/public/assets/js/jquery.min.js'>"+"<"+"/script>");
	</script>
    
    <script type="text/javascript">
			if('ontouchstart' in document.documentElement) document.write("<script src='assets/js/jquery.mobile.custom.min.js'>"+"<"+"/script>");
		</script>
		<script src="/duijie/public/assets/js/bootstrap.min.js"></script>

		<!-- page specific plugin scripts -->
		<script src="/duijie/public/assets/js/fuelux/fuelux.wizard.min.js"></script>
		<script src="/duijie/public/assets/js/jquery.validate.min.js"></script>
		<script src="/duijie/public/assets/js/additional-methods.min.js"></script>
		<script src="/duijie/public/assets/js/bootbox.min.js"></script>
		<script src="/duijie/public/assets/js/jquery.maskedinput.min.js"></script>
		<script src="/duijie/public/assets/js/select2.min.js"></script>

		<!-- ace scripts -->
		<script src="/duijie/public/assets/js/ace-elements.min.js"></script>
		<script src="/duijie/public/assets/js/ace.min.js"></script>

		<!-- inline scripts related to this page -->
		<script type="text/javascript">
			jQuery(function($) {
			
				//$('[data-rel=tooltip]').tooltip();
			
				//$(".select2").css('width','200px').select2({allowClear:true})
				//.on('change', function(){
				//	$(this).closest('form').validate().element($(this));
				//}); 
			
			
				var $validation = false;
				$('#fuelux-wizard')
				.ace_wizard({
					//step: 2 //optional argument. wizard will jump to step "2" at first
				})
				.on('change' , function(e, info){
					if(info.step == 1 && $validation) {
						if(!$('#validation-form').valid()) return false;
					}
				})
				.on('finished', function(e) {
/* 					bootbox.dialog({
						message: "定制服务成功！", 
						buttons: {
							"success" : {
								"label" : "OK",
								"className" : "btn-sm btn-primary",
								callback: function () {  
		                           
		                        }
							}
						}
					}); */

					/* $.get('{:U('changeStatus')}').success(function(data){
		                if (data.status==1) {
		                    if (data.url) {
		                        updateAlert(data.info + ' 页面即将自动跳转~','alert-success');
		                    }else{
		                        updateAlert(data.info,'alert-success');
		                    }
		                    setTimeout(function(){
		                        if (data.url) {
		                            location.href=data.url;
		                        }else if( $(that).hasClass('no-refresh')){
		                            $('#top-alert').find('button').click();
		                        }else{
		                            location.reload();
		                        }
		                    },1500);
		                }else{
		                    updateAlert(data.info);
		                    setTimeout(function(){
		                        if (data.url) {
		                            location.href=data.url;
		                        }else{
		                            $('#top-alert').find('button').click();
		                        }
		                    },1500);
		                }
		            });*/
		         
				$('#form').submit();
				 setTimeout(function(){
				window.location="{:U('Actmanage/viping')}";
                },5); 
				 //window.location="{:U('Actmanage/viping')}";
				}).on('stepclick', function(e){
					//e.preventDefault();//this will prevent clicking and selecting steps
				});
			
			
				//jump to a step
				$('#step-jump').on('click', function() {
					var wizard = $('#fuelux-wizard').data('wizard')
					wizard.currentStep = 3;
					wizard.setState();
				})
				//determine selected step
				//wizard.selectedItem().step
			  
				//js匹配效果
				/*.on('finished', function(e) {
					bootbox.dialog({
						message: "定制服务成功！2秒后自动跳转", 
						buttons: {
							"success" : {
								"label" : "ok",
								"className" : "btn-sm btn-primary",
							}
						}
					});
				setTimeout(function(){window.location="admin.php?c=Actmanage&a=vipindex";},2000);

				*/
				$('#modal-wizard .modal-header').ace_wizard();
				$('#modal-wizard .wizard-actions .btn[data-dismiss=modal]').removeAttr('disabled');
				

			})
			
			
			
		</script>

		<!-- the following scripts are used in demo only for onpage help and you don't need them -->
		<link rel="stylesheet" href="/duijie/public/assets/css/ace.onpage-help.css" />
		<link rel="stylesheet" href="/duijie/public/docs/assets/js/themes/sunburst.css" />

		<script type="text/javascript"> ace.vars['base'] = '..'; </script>
		<script src="/duijie/public/assets/js/ace/elements.onpage-help.js"></script>
		<script src="/duijie/public/assets/js/ace/ace.onpage-help.js"></script>
		<script src="/duijie/public/docs/assets/js/rainbow.js"></script>
		<script src="/duijie/public/docs/assets/js/language/generic.js"></script>
		<script src="/duijie/public/docs/assets/js/language/html.js"></script>
		<script src="/duijie/public/docs/assets/js/language/css.js"></script>
		<script src="/duijie/public/docs/assets/js/language/javascript.js"></script>
    
</block>
